//
// Created by hsj on 2021/12/30.
//
#include "iostream"
#include "f_float.h"
#include <bits/locale_classes.h>
#include <locale>
//测试float小数类型
void test_ffloat(){
    using namespace std;

    float hsj = 18.0f;
    float hsj_future = 100.0f;
//    float 保证6位数
//    ios_base::fixed是设置cout为定点输出格式
//    ios_base::floatfield是设置输出时按浮点格式，小数点后有6位数字
    cout.setf(ios_base::fixed,ios_base::floatfield);
    /**
        vim /etc/locale.conf

        #LANG=en_US.UTF-8
        LANG="zh_CN.UTF-8"

        source /etc/locale.conf
     */
    setlocale(LC_ALL, "zh_CN.UTF-8");

    wchar_t tip[] = L"何胜金future年龄:";
    cout<<"hsj now age:"<<hsj<<endl;
    wcout<<tip<<endl;
    wcout<<hsj_future<<endl;
}